package com.ztjy.purchase.dao;

import com.ztjy.bean.CDetails;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface CDetailsDao {
    List<CDetails> findAll();

    /**
     * 根据productId查看详情
     * @param id
     * @return
     */
    List<CDetails> findByIdCDetails(String id);

    CDetails findCDetailsByDid(Integer detailsId);

    int insertSelective(CDetails record);

    /**
     * 根据purchaseId删除
     * @param purchaseId
     * @return
     */
    boolean delDetails(String purchaseId);

    /**
     * 修改
     * @param cDetails
     * @return
     */
    boolean updateByPrimaryKeySelective(CDetails cDetails);
}
